package com.lening.iot.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lening.common.base.BaseServiceImpl;
import com.lening.iot.dao.InreadDAO;
import com.lening.iot.dto.InreadDTO;
import com.lening.iot.po.InreadPO;
import com.lening.iot.service.InreadService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ToDo:
 * @Author：李忠达
 * @date: 2024/6/4 14:06
 */
@Service
public class InreadServiceImpl extends BaseServiceImpl<InreadDAO, InreadPO, InreadDTO> implements InreadService{
    @Autowired(required = false)
    private InreadDAO inreadDAO;
    @Override
    public Page<InreadDTO> getAllInr(Page<InreadDTO> inreadDTOPage) {
        Page<InreadDTO> inrList = inreadDAO.getAllInr(inreadDTOPage);
        return inrList;
    }

    @Override
    public List<InreadDTO> getAll(String communityname) {
        return inreadDAO.getAll(communityname);
    }

    @Override
    public Page<?> page(InreadDTO inreadDTO) {
        return inreadDAO.getAllInr(inreadDTO);
    }

    @Override
    public InreadPO getById(Long id) {
        return this.inreadDAO.getById(id);
    }
}
